/*
 * author: VDaras
 */

#ifndef CANVAS_H
#define	CANVAS_H

#include "Blittable.h"

/**
 * Class representing an empty Surface. The empty surface is filled with a
 * background color. This class' buffer can never be NULL.  So:
 * - no default constructor is provided.
 * - the provided constructor throws an exception if a surface could not be allocated
 *   for some reason.
 * - method for creating a surface is private.
 */

namespace sdl
{

class Color;

class Canvas : public Blittable
{
public:
    Canvas(int width, int height);
    Canvas(int width, int height, const Color &background);
    ~Canvas();
    bool Render();

    /**
     * Fills the canvas with transparent pixels.
     */

    void FillTransparent();

private:
    bool Create(int width,int height);

    bool Create(int width, int height, const Color &background);
};

};

#endif	/* CANVAS_H */

